Strict

Import mojo
Import agfx

Global myTmpScreen:TTmpScreen

Class TAgfx_test_app Extends TFramework

	Method OnCreate:Int()
		
		Super.OnCreate()
				
		myTmpScreen = New TTmpScreen		
		myTmpScreen.Prepare()
		
		Return 0
	End
	
End


Class TTmpScreen Extends TScreen

	Field properties:TProperties = New TProperties()
	
	' START when app is created
	Method Start:Void()
		
		Self.properties.Add(New TProperty("test_str","text"))
		Self.properties.Add(New TProperty("test_int",128))
		Self.properties.Add(New TProperty("test_float",1.25))
		Self.properties.Add(New TProperty("test_bool",true))
	
		Print("----------------------")
		
		Print(properties.Find("test_str"))
		Print(properties.Find("test_int"))
		Print(properties.Find("test_float"))
		Print(properties.Find("test_bool"))
				
		Local val_str:String 	= properties.Find("test_str").ToString()
		Local val_int:Int 		= properties.Find("test_int").ToInt()
		Local val_float:Float	= properties.Find("test_float").ToFloat()
		Local val_bool:Bool		= properties.Find("test_bool").ToBool()
		
		Print("----------------------")
		
		Print(val_str)
		Print(val_int)
		Print(val_float)
		If(val_bool) Print("true") Else Print("false")
		
	End
	
	' main app logic loop update
	Method Update:Void()
		
	End
	
	' main app render loop
	Method Render:Void()
		Cls		
	End
End
